package com.literature.search.core.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统角色表
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document
@ApiModel(value="Role对象", description="系统角色表")
public class Role implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "角色id")
	@Id
	private int id;

	@ApiModelProperty(value = "角色名称, 唯一约束",example = "admin")
	@Field("role_name")
	private String roleName;

	@ApiModelProperty(value = "角色详细描述",example = "管理员")
	private String info;

	@ApiModelProperty(value = "是否锁定(1=是,2=否), 锁定之后不可随意删除, 防止误操作",example = "1")
	@Field("is_lock")
	private Integer isLock = 1;

	@ApiModelProperty(value = "创建时间")
	@Field("create_time")
	private Date createTime;
}
